Optimal. Leaf size=179 \[ -\frac {\tanh ^{-1}\left (\frac {b+2 c x}{2 \sqrt {c} \sqrt {a+b x+c x^2}}\right ) (b f h-2 c e h+2 c f g)}{2 c^{3/2} h^2}+\frac {\left (f g^2-h (e g-d h)\right ) \tanh ^{-1}\left (\frac {-2 a h+x (2 c g-b h)+b g}{2 \sqrt {a+b x+c x^2} \sqrt {a h^2-b g h+c g^2}}\right )}{h^2 \sqrt {a h^2-b g h+c g^2}}+\frac {f \sqrt {a+b x+c x^2}}{c h} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.29, antiderivative size = 179, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 5, integrand size = 32, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.156, Rules used = {1653, 843, 621, 206, 724} \[ -\frac {\tanh ^{-1}\left (\frac {b+2 c x}{2 \sqrt {c} \sqrt {a+b x+c x^2}}\right ) (b f h-2 c e h+2 c f g)}{2 c^{3/2} h^2}+\frac {\left (f g^2-h (e g-d h)\right ) \tanh ^{-1}\left (\frac {-2 a h+x (2 c g-b h)+b g}{2 \sqrt {a+b x+c x^2} \sqrt {a h^2-b g h+c g^2}}\right )}{h^2 \sqrt {a h^2-b g h+c g^2}}+\frac {f \sqrt {a+b x+c x^2}}{c h} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 206
Rule 621
Rule 724
Rule 843
Rule 1653
Rubi steps
\begin {align*} \int \frac {d+e x+f x^2}{(g+h x) \sqrt {a+b x+c x^2}} \, dx &=\frac {f \sqrt {a+b x+c x^2}}{c h}+\frac {\int \frac {-\frac {1}{2} h (b f g-2 c d h)-\frac {1}{2} h (2 c f g-2 c e h+b f h) x}{(g+h x) \sqrt {a+b x+c x^2}} \, dx}{c h^2}\\ &=\frac {f \sqrt {a+b x+c x^2}}{c h}-\frac {(2 c f g-2 c e h+b f h) \int \frac {1}{\sqrt {a+b x+c x^2}} \, dx}{2 c h^2}+\frac {\left (f g^2-e g h+d h^2\right ) \int \frac {1}{(g+h x) \sqrt {a+b x+c x^2}} \, dx}{h^2}\\ &=\frac {f \sqrt {a+b x+c x^2}}{c h}-\frac {(2 c f g-2 c e h+b f h) \operatorname {Subst}\left (\int \frac {1}{4 c-x^2} \, dx,x,\frac {b+2 c x}{\sqrt {a+b x+c x^2}}\right )}{c h^2}-\frac {\left (2 \left (f g^2-e g h+d h^2\right )\right ) \operatorname {Subst}\left (\int \frac {1}{4 c g^2-4 b g h+4 a h^2-x^2} \, dx,x,\frac {-b g+2 a h-(2 c g-b h) x}{\sqrt {a+b x+c x^2}}\right )}{h^2}\\ &=\frac {f \sqrt {a+b x+c x^2}}{c h}-\frac {(2 c f g-2 c e h+b f h) \tanh ^{-1}\left (\frac {b+2 c x}{2 \sqrt {c} \sqrt {a+b x+c x^2}}\right )}{2 c^{3/2} h^2}+\frac {\left (f g^2-h (e g-d h)\right ) \tanh ^{-1}\left (\frac {b g-2 a h+(2 c g-b h) x}{2 \sqrt {c g^2-b g h+a h^2} \sqrt {a+b x+c x^2}}\right )}{h^2 \sqrt {c g^2-b g h+a h^2}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.28, size = 172, normalized size = 0.96 \[ -\frac {\frac {\tanh ^{-1}\left (\frac {b+2 c x}{2 \sqrt {c} \sqrt {a+x (b+c x)}}\right ) (b f h-2 c e h+2 c f g)}{c^{3/2}}+\frac {2 \left (h (d h-e g)+f g^2\right ) \tanh ^{-1}\left (\frac {2 a h-b g+b h x-2 c g x}{2 \sqrt {a+x (b+c x)} \sqrt {h (a h-b g)+c g^2}}\right )}{\sqrt {h (a h-b g)+c g^2}}-\frac {2 f h \sqrt {a+x (b+c x)}}{c}}{2 h^2} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F(-2)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: TypeError} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.02, size = 599, normalized size = 3.35 \[ -\frac {d \ln \left (\frac {\frac {\left (h b -2 c g \right ) \left (x +\frac {g}{h}\right )}{h}+\frac {2 a \,h^{2}-2 b g h +2 c \,g^{2}}{h^{2}}+2 \sqrt {\frac {a \,h^{2}-b g h +c \,g^{2}}{h^{2}}}\, \sqrt {\left (x +\frac {g}{h}\right )^{2} c +\frac {\left (h b -2 c g \right ) \left (x +\frac {g}{h}\right )}{h}+\frac {a \,h^{2}-b g h +c \,g^{2}}{h^{2}}}}{x +\frac {g}{h}}\right )}{\sqrt {\frac {a \,h^{2}-b g h +c \,g^{2}}{h^{2}}}\, h}+\frac {e g \ln \left (\frac {\frac {\left (h b -2 c g \right ) \left (x +\frac {g}{h}\right )}{h}+\frac {2 a \,h^{2}-2 b g h +2 c \,g^{2}}{h^{2}}+2 \sqrt {\frac {a \,h^{2}-b g h +c \,g^{2}}{h^{2}}}\, \sqrt {\left (x +\frac {g}{h}\right )^{2} c +\frac {\left (h b -2 c g \right ) \left (x +\frac {g}{h}\right )}{h}+\frac {a \,h^{2}-b g h +c \,g^{2}}{h^{2}}}}{x +\frac {g}{h}}\right )}{\sqrt {\frac {a \,h^{2}-b g h +c \,g^{2}}{h^{2}}}\, h^{2}}-\frac {f \,g^{2} \ln \left (\frac {\frac {\left (h b -2 c g \right ) \left (x +\frac {g}{h}\right )}{h}+\frac {2 a \,h^{2}-2 b g h +2 c \,g^{2}}{h^{2}}+2 \sqrt {\frac {a \,h^{2}-b g h +c \,g^{2}}{h^{2}}}\, \sqrt {\left (x +\frac {g}{h}\right )^{2} c +\frac {\left (h b -2 c g \right ) \left (x +\frac {g}{h}\right )}{h}+\frac {a \,h^{2}-b g h +c \,g^{2}}{h^{2}}}}{x +\frac {g}{h}}\right )}{\sqrt {\frac {a \,h^{2}-b g h +c \,g^{2}}{h^{2}}}\, h^{3}}-\frac {b f \ln \left (\frac {c x +\frac {b}{2}}{\sqrt {c}}+\sqrt {c \,x^{2}+b x +a}\right )}{2 c^{\frac {3}{2}} h}+\frac {e \ln \left (\frac {c x +\frac {b}{2}}{\sqrt {c}}+\sqrt {c \,x^{2}+b x +a}\right )}{\sqrt {c}\, h}-\frac {f g \ln \left (\frac {c x +\frac {b}{2}}{\sqrt {c}}+\sqrt {c \,x^{2}+b x +a}\right )}{\sqrt {c}\, h^{2}}+\frac {\sqrt {c \,x^{2}+b x +a}\, f}{c h} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F(-2)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: ValueError} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.01 \[ \int \frac {f\,x^2+e\,x+d}{\left (g+h\,x\right )\,\sqrt {c\,x^2+b\,x+a}} \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {d + e x + f x^{2}}{\left (g + h x\right ) \sqrt {a + b x + c x^{2}}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________